//
//  ZPAuthStore.h
//  ZPIOSEducation
//
//  Created by mini1 on 2016/12/21.
//  Copyright © 2016年 mini1. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface ZPAuthStore : NSObject{
    
    
@private
    NSString   *accessToken_;
    NSInteger        memberId_;
}
ZPSingletonH(ZPAuthStore) // 单例声明

@property (nonatomic, copy ,readonly) NSString *accessToken;

//@property (nonatomic, copy) NSString *refreshToken;

@property (nonatomic, copy) NSString           *expiresIn;

@property (nonatomic, assign,readonly) NSInteger memberId;

//+ (instancetype)sharedInstance;

- (void)updateWithSuccessDictionary:(NSDictionary *)dic;

-(void)dicToUserEntity:(NSMutableDictionary *)dic;

-(NSMutableDictionary *)userToDic;

//- (BOOL)hasExpired;

// refresh token one day before token is expired.

//- (BOOL)shouldRefreshToken;

- (void)saveTokenAndInitWithToken:(NSString *)token;

- (void)clear;

- (void)setWebViewCookiesWithType:(NSInteger)type;

- (void)resetUserInfoDictionary;

- (BOOL)isLogin;

@end
